package com.ruoyi.t.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.t.mapper.TOrderUserPaymentMapper;
import com.ruoyi.t.domain.TOrderUserPayment;
import com.ruoyi.t.service.ITOrderUserPaymentService;

/**
 * 订单供应商结款Service业务层处理
 * 
 * @author YY
 * @date 2025-02-06
 */
@Service
public class TOrderUserPaymentServiceImpl implements ITOrderUserPaymentService 
{
    @Autowired
    private TOrderUserPaymentMapper tOrderUserPaymentMapper;

    /**
     * 查询订单供应商结款
     * 
     * @param id 订单供应商结款主键
     * @return 订单供应商结款
     */
    @Override
    public TOrderUserPayment selectTOrderUserPaymentById(Long id)
    {
        return tOrderUserPaymentMapper.selectTOrderUserPaymentById(id);
    }

    /**
     * 查询订单供应商结款列表
     * 
     * @param tOrderUserPayment 订单供应商结款
     * @return 订单供应商结款
     */
    @Override
    public List<TOrderUserPayment> selectTOrderUserPaymentList(TOrderUserPayment tOrderUserPayment)
    {
        return tOrderUserPaymentMapper.selectTOrderUserPaymentList(tOrderUserPayment);
    }

    /**
     * 新增订单供应商结款
     * 
     * @param tOrderUserPayment 订单供应商结款
     * @return 结果
     */
    @Override
    public int insertTOrderUserPayment(TOrderUserPayment tOrderUserPayment)
    {
        tOrderUserPayment.setCreateTime(DateUtils.getNowDate());
        return tOrderUserPaymentMapper.insertTOrderUserPayment(tOrderUserPayment);
    }

    /**
     * 修改订单供应商结款
     * 
     * @param tOrderUserPayment 订单供应商结款
     * @return 结果
     */
    @Override
    public int updateTOrderUserPayment(TOrderUserPayment tOrderUserPayment)
    {
        tOrderUserPayment.setUpdateTime(DateUtils.getNowDate());
        return tOrderUserPaymentMapper.updateTOrderUserPayment(tOrderUserPayment);
    }

    /**
     * 批量删除订单供应商结款
     * 
     * @param ids 需要删除的订单供应商结款主键
     * @return 结果
     */
    @Override
    public int deleteTOrderUserPaymentByIds(Long[] ids)
    {
        return tOrderUserPaymentMapper.deleteTOrderUserPaymentByIds(ids);
    }

    /**
     * 删除订单供应商结款信息
     * 
     * @param id 订单供应商结款主键
     * @return 结果
     */
    @Override
    public int deleteTOrderUserPaymentById(Long id)
    {
        return tOrderUserPaymentMapper.deleteTOrderUserPaymentById(id);
    }
}
